/*
 *    Copyright (c) 2018-2025, boss All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 * Redistributions of source code must retain the above copyright notice,
 * this list of conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright
 * notice, this list of conditions and the following disclaimer in the
 * documentation and/or other materials provided with the distribution.
 * Neither the name of the boss developer nor the names of its
 * contributors may be used to endorse or promote products derived from
 * this software without specific prior written permission.
 * Author: boss
 */

package com.hopes.bizz.poll.video.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.hopes.bizz.poll.common.constant.enums.PollSysDictEnum;
import com.hopes.boss.admin.api.resolver.DictResolver;
import com.hopes.boss.admin.api.resolver.enums.SysDictEnum;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Date;

/**
 * 违规报警
 *
 * @author cx
 * @date 2023-09-20 13:14:20
 */
@Data
@TableName("poll_vd_illegal_alarm")
@EqualsAndHashCode(callSuper = true)
@Schema(description = "违规报警")
public class PollVdIllegalAlarmEntity extends Model<PollVdIllegalAlarmEntity> {

    private static final long serialVersionUID = 1L;


	/**
	* 标识
	*/
    @TableId(type = IdType.ASSIGN_ID)
    @Schema(description="标识")
    private Long id;

	/**
	* 违规类型
	*/
    @Schema(description="违规类型")
    private Integer illegalType;

	/**
	* 报警内容
	*/
    @Schema(description="报警内容")
    private String alarmContent;

	/**
	* 报警时间
	*/
    @Schema(description="报警时间")
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	private Date alarmTime;

	/**
	* 报警图片
	*/
    @Schema(description="报警图片")
    private String alarmImg;

	/**
	* 销警时间
	*/
    @Schema(description="销警时间")
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	private Date removeTime;

	/**
	* 处理状态
	*/
    @Schema(description="处理状态")
    private Integer handleStatus;

	/**
	* 处理意见
	*/
    @Schema(description="处理意见")
    private String handleContent;

	/**
	* 是否人脸识别
	*/
    @Schema(description="是否人脸识别")
    private String isFaceIdentify;

	/**
	* 识别人员ID
	*/
    @Schema(description="识别人员ID")
    private Long identifyAccountId;

	/**
	* 是否短信通知
	*/
    @Schema(description="是否短信通知")
    private String isSmsNotify;

	/**
	* 通知人员
	*/
    @Schema(description="通知人员")
    private String identifyPerson;
 
	/**
	* cameraId
	*/
    @Schema(description="cameraId")
    private String cameraId;
 
	/**
	* areaId
	*/
    @Schema(description="areaId")
    private String areaId;
 
	/**
	* recordId
	*/
    @Schema(description="recordId")
    private String recordId;
 
	/**
	* isClear
	*/
    @Schema(description="isClear")
    private String isClear;
 
	/**
	* alarmDetectedImg
	*/
    @Schema(description="alarmDetectedImg")
    private String alarmDetectedImg;

	/**
	* 机构ID
	*/
    @Schema(description="机构ID")
    private Long orgId;

	/**
	* 创建人
	*/
	@TableField(fill = FieldFill.INSERT)
    @Schema(description="创建人")
    private String createBy;
 
	/**
	* updateBy
	*/
	@TableField(fill = FieldFill.INSERT_UPDATE)
    @Schema(description="updateBy")
    private String updateBy;
 
	/**
	* createTime
	*/
	@TableField(fill = FieldFill.INSERT)
    @Schema(description="createTime")
    private LocalDateTime createTime;
 
	/**
	* updateTime
	*/
	@TableField(fill = FieldFill.INSERT_UPDATE)
    @Schema(description="updateTime")
    private LocalDateTime updateTime;

	/**
	* 删除标记，0未删除，1已删除
	*/
    @TableLogic
    @Schema(description="删除标记，0未删除，1已删除")
    private String delFlag;
 
	/**
	* tenantId
	*/
    @Schema(description="tenantId")
    private Long tenantId;


	public String getIllegalTypeStr() {
		return DictResolver.getItemLabelByValue(PollSysDictEnum.poll_video_illegal_type, this.getIllegalType());
	}
	public String getHandleStatusStr() {
		return DictResolver.getItemLabelByValue(PollSysDictEnum.alarm_handle_status, this.getHandleStatus());
	}

	public String getIsFaceIdentifyStr() {
		return DictResolver.getItemLabelByValue(SysDictEnum.yes_no_type, this.getIsFaceIdentify());
	}
	public String getIsSmsNotifyStr() {
		return DictResolver.getItemLabelByValue(SysDictEnum.yes_no_type, this.getIsSmsNotify());
	}



}